<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

<!-- 为ECharts准备一个具备大小（宽高）的Dom  style="width: 600px;height:400px;"-->
<div id="main" style="height:400px;"></div>

<!-- 引入 echarts.js -->
<script src="echarts.js"></script>
<script>

    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    var option = {
        xAxis: {
            type: 'category',
            data: ['2018-09', '2018-10', '2018-11', '2018-12', '2019-01', '2019-02', '2019-03']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            data: [820, 932, 901, 934, 1290, 1330, 1320],
            type: 'line'
        }]
    }

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

</body>
</html>
